﻿using Pattern23责任链模式.Base;
using Pattern23责任链模式.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pattern23责任链模式
{
    internal class Client
    {
        public void Start()
        {
            HandlerBase manager = new Manager();
            HandlerBase director = new Director();
            HandlerBase vicePresident = new VicePresident();

            manager.SetNextHandler(director);
            director.SetNextHandler(vicePresident);

            Order order = new Order
            {
                Id = 1,
                Name = "张三",
                Amount = 155099
            };

            manager.Approve(order);
        }
    }
}
